package com.liao.badminton.code;

import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @description: 每个表相同的字段
 * @author: TangMonk
 * @create: 2024-10-28 14:36
 **/
@Data
public class BaseField implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long creator;  //创建者
    private Date createTime;  //创建时间
    private Long updater;  //更新者
    private Date updateTime;  //更新时间
    private Integer deleted;  //是否删除 -1 刪除
    private Long tenantId;  //租户编号

    public static void invert(BaseField baseField, BaseField baseFieldResult) {
        baseFieldResult.setCreator(baseField.getCreator());
        baseFieldResult.setCreateTime(baseField.getCreateTime());
        baseFieldResult.setUpdater(baseField.getUpdater());
        baseFieldResult.setUpdateTime(baseField.getUpdateTime());
        baseFieldResult.setDeleted(baseField.getDeleted());
        baseFieldResult.setTenantId(baseField.getTenantId());
    }
}
